from redis import StrictRedis
class Config:
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/test22'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    # 指定数据库
    SESSION_TYPE = 'redis'
    # 进行签名
    SESSION_USE_SIGNER = True
    # 存储实例
    REDIS_HOST = '127.0.0.1'
    REDIS_POST = 6379
    # 实例化存储
    SESSION_REDIS = StrictRedis(host=REDIS_HOST, port=REDIS_POST)
    # 过期时间
    PERMANENT_SESSION_LIFETIME = 68400
    # 密钥
    SECRET_KEY = 'msblX8V/lfhApGU0eBYEbJYVZPKU8QU/bs+8NwLF2AY='

class developmentConfig(Config):
    DEBUG = True
class productionConfig(Config):
    DEBUG = False

config = {
    'develop': developmentConfig,
    'product': productionConfig
}